#region Copyright
/// <copyright>
/// Copyright (c) 2007 Ilia Shramko.
/// Released under the terms of the GNU General Public License.
/// </copyright>
#endregion

using System;
using System.Collections.Generic;
using System.Text;

namespace Osh.Teletext
{
	public class NormalPacket : TeletextPacket
	{
		public const int MinNormalPacketNumber = 1;
		public const int MaxNormalPacketNumber = 25;

		private byte[] _data;
		
		public NormalPacket(int magazine, int number, byte[] data, int position) : base(magazine, number)
		{
			if(number < MinNormalPacketNumber || number > MaxNormalPacketNumber)
				throw new ArgumentOutOfRangeException("number");

			_data = new byte[40];
			Buffer.BlockCopy(data, position, _data, 0, 40);
		}

		public byte[] Data
		{
			get { return _data; }
		}
	}

}
